//
//  DSZMoreView.m
//  7.13苏宁框架
//
//  Created by app05 on 15/7/18.
//  Copyright (c) 2015年 lovena. All rights reserved.
//

#import "DSZMoreView.h"
#import "DSZStyleOneCell.h"
@implementation DSZMoreView

+(instancetype)moreView
{
    return [[NSBundle mainBundle]loadNibNamed:@"DSZMoreView" owner:nil options:nil][0];
}
-(void)awakeFromNib
{
    UITableView *tableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 13, 146, 227) style:UITableViewStylePlain];
    tableView.backgroundColor=[UIColor clearColor];
    tableView.delegate=self;
    tableView.dataSource=self;
    tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
    [self addSubview:tableView];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 4;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = nil;
    
    if (indexPath.row == 0) {
        
        DSZStyleOneCell *moreCell=[DSZStyleOneCell moreCell1];
        cell=moreCell;
        
    }else if (indexPath.row == 1) {
        
        DSZStyleOneCell *moreCell=[DSZStyleOneCell moreCell2];
        cell=moreCell;
        
    }else if (indexPath.row == 2) {
        
        DSZStyleOneCell *moreCell=[DSZStyleOneCell moreCell4];
        cell=moreCell;
        
    }else {
        DSZStyleOneCell *moreCell=[DSZStyleOneCell moreCell5];
        cell=moreCell;
    }
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    cell.backgroundColor = [UIColor clearColor];
    return cell;
    
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([self.delegate respondsToSelector:@selector(dszMoreViewWithIndexRow:)]) {
        [self.delegate dszMoreViewWithIndexRow:indexPath.row];
    }
}
@end
